package com.javautil;

import java.util.Calendar;
import java.util.Date;
import java.util.Scanner;

public class CalendScanner {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("输入第一个时间戳：");
        long sc1 = sc.nextLong();
        System.out.println("输入第二个时间戳");
        long sc2 = sc.nextLong();
        Date date1 = new Date(sc1);
        Date date2 = new Date(sc2);
        Calendar calendar1 = Calendar.getInstance();
        Calendar calendar2 = Calendar.getInstance();
        calendar1.setTime(date1);
        calendar1.setTime(date2);
        int i = calendar1.get(Calendar.DAY_OF_YEAR);
        int j = calendar2.get(Calendar.DAY_OF_YEAR);
        System.out.println(Math.abs(i - j));


    }
}
